#pragma once
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#include<stdbool.h>


typedef int HPDateType;
typedef struct Heap
{
	HPDateType* a;
	int size;
	int capacity;
}HP;

void HeapInit(HP* php);
void AdjustUp(HPDateType* a, int child);
void AdjustDown(HPDateType* a, int size, int parent);

void HeapDestory(HP* php);
void HeapPrint(HP* php);
void HeapPush(HP* php,HPDateType x);
void HeapPop(HP* php);
HPDateType HeapTop(HP* php);
bool HeapEmpty(HP* php);
int HeapSize(HP* php);